<div class="ant-select ant-select-enabled">
  <div class="ant-select-selection ant-select-selection--multiple">
    <div class="ant-select-selection__rendered">
      <ul>
        <li class="ant-select-selection__choice" *ngFor="let u of users">
          <div class="ant-select-selection__choice__content">{{u.name}}</div>
          <span class="ant-select-selection__choice__remove " *ngIf="!enable">
            <i nz-icon="" type="close" (click)="del(u)"></i>
          </span>
        </li>
        <li class="ant-select-selection__choice" style="padding: 0 10px 0 10px;" *ngIf="!enable">
          <div class="ant-select-selection__choice__content" (click)="open()">选择</div>
        </li>
      </ul>
    </div>
  </div>
</div>

<nz-modal nzWidth='940' nzTitle="用户选择" [nzMaskClosable]='false' [nzFooter]="null" [(nzVisible)]="fs.isEditVisible"
  (nzOnCancel)="close()">
  <!-- 内容 -->
  <div class="user-work">
    <!-- 查询框 -->
    <div class="top">
      <nz-tree-select required class="fm-input" [(ngModel)]="key" name="departmentId" nzPlaceHolder="部门"
        [nzDropdownMatchSelectWidth]="true" [nzDropdownStyle]="{ 'max-height': '300px' }" [nzAsyncData]="true"
        [nzNodes]="depDic.treeDatas">
      </nz-tree-select>
      <input nz-input placeholder="姓名" class="fm-input" [(ngModel)]="fs.queryObject['userName:like']" />
      <input nz-input placeholder="工号" class="fm-input" [(ngModel)]="fs.queryObject['userid:like']" />
      <nz-button-group>
        <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
        <button nz-button (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
      </nz-button-group>
      <div class="tool-right">
        <button nz-button [nzType]="'primary'" (click)="select()">选择</button>
      </div>
    </div>
    <!-- 右则样表单主体 -->
    <div class="work-content">
      <div class="table">
        <nz-table nzSize="middle" nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
          [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
          [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
          (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
          <thead (nzSortChange)="fs.sort($event)" nzSingleSort>
            <tr>
              <th nzWidth="10%" nzShowCheckbox [(nzChecked)]="fs.allChecked" [nzIndeterminate]="fs.indeterminate"
                (nzCheckedChange)="fs.checkAll($event)">
              </th>
              <th nzWidth="15%">姓名</th>
              <th nzWidth="20%">工号</th>
              <th nzWidth="15%">类型</th>
              <th nzWidth="20%">部门</th>
              <th nzWidth="20%">职务</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of fs.datas">
              <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
              </td>
              <td>
                {{data.userName}}
              </td>
              <td>
                {{data.userid}}
              </td>
              <td>
                {{data.employeetypeName}}
              </td>
              <td>
                {{data.departmentName}}
              </td>
              <td>
                {{data.positionName}}
              </td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</nz-modal>